<template>
  <div class="hello">
    <NavMenu></NavMenu>
    <div class="carousel">
      <el-carousel :interval="4000" type="card" height="400px">
        <el-carousel-item v-for="src in imgs" :key="src">
          <el-row>
            <el-col :span="24"><img ref="imgHeight" :src="src" class="banner_img" /></el-col>
          </el-row>
        </el-carousel-item>
      </el-carousel>
    </div>
  </div>
</template>

<script>
import NavMenu from "@/components/NavMenu";
export default {
  name: "HelloWorld",
  data() {
    return {
      msg: "Welcome to Your Vue.js App",
      imgs: [
        require("../static/imgs/1.jpg"),
        require("../static/imgs/2.jpg"),
        require("../static/imgs/3.jpg"),
        require("../static/imgs/4.jpg"),
        require("../static/imgs/5.jpg")
      ]
    };
  },
  components: {
    NavMenu
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}

.carousel {
  margin-top: 40px;
}

.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
